/*
 * @Author: yanjinzhong
 * @Date: 2021-04-13 01:07:10
 * @Description: file content
 */
import { toRaw } from 'vue';
/**
 * @description: 配置CRUD方法
 * @return {c/r/u/d} 返回crud方法
 * @author: yanjinzhong
 */
export const useCrud = (): any => {
  const handleCreate = async (item: any) => {
    await item.view(toRaw(item.params));
  };

  const handleRead = () => {};

  const handleUpdate = () => {};

  const handleDelete = () => {};

  return {
    handleCreate,
    handleRead,
    handleUpdate,
    handleDelete,
  };
};
